package gui.obu.alerts.panels;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

import com.swtdesigner.SWTResourceManager;

public class ObuStopSignAlertPanelImpl extends AbstractAlertPanelImpl implements ObuStopSignAlertPanel {

	private Label message;

	public ObuStopSignAlertPanelImpl(Display display, Shell shell) {
		super(display, shell);
		
		message = new Label(shell, SWT.CENTER);
	}

	/* (non-Javadoc)
	 * @see gui.obu.alerts.ObuStopSignAlertPanel#open()
	 */
	@Override
	public void open() {
		super.open();
		
		message.setBounds(10, 125, 360, 73);
		message.setText("Next time, stop at the Stop Sign for at least 3 seconds or until the intersection is empty.");
		message.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
		message.setFont(new Font(display, "Arial", 16, SWT.ITALIC));
		
		shell.open();
		shell.layout();
	}

	@Override
	public void dispose() {
		super.dispose();
		message.dispose();
	}
}
